// 数组去重
const uniq = require('uniq');

let arr =[1,2,3,4,4,3,2,1];
let arr2 = [...arr];
uniq(arr2);
console.log('arr',arr);

console.log('arr2',arr2);